package com.itany.corejava.day13;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Arrays;

public class TestIOStream2 {


    public static void main(String[] args) {


        try(FileInputStream fis=new FileInputStream("d:/a.txt");
            FileOutputStream fos=new FileOutputStream("d:/b.txt")){


            byte[] b=new byte[1024];

            int n;

            while((n=fis.read(b))!=-1){
//                System.out.println(Arrays.toString(b));
                fos.write(b,0,n);
            }


        }catch (Exception e){
            e.printStackTrace();
        }




    }
}
